package com.mindata.blockmanager.controller.webService;

import com.mindata.blockmanager.bean.MemberData;
import com.mindata.blockmanager.manager.MemberManager;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wuweifeng wrote on 2018/3/7.
 */
@RestController
@RequestMapping("/webservice")
public class MemberController {
    @Resource
    private MemberManager memberManager;

    /**
     * 获取所有的节点信息
     *
     * @param name  name
     * @param appId appId
     * @param ip    ip
     * @return ip
     */
    @RequestMapping(value = "/member")
    public MemberData member(String name, String appId, String ip, int port) {
        return memberManager.memberData(name, appId, ip, port);
    }
}
